﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Microsoft.Reporting.WebForms;
using System.Web;
using Library.Helpers;
using System.Threading;
using Core.IGateways;
using System.Collections;
using Core.Dtos;

namespace Reports
{
    public class PolicyReport : BaseReport, IPolicyReport
    {
        public PolicyReport()
        {                        
        }

        protected override Microsoft.Reporting.WebForms.LocalReport BuildLocalReport(string reportPath, Hashtable parameters)
        {
            MotorPolicyDto policy = (MotorPolicyDto)parameters["policy"];

            LocalReport localReport = new LocalReport();
            localReport.ReportPath = reportPath;                
            localReport.DataSources.Add(CreateReportDataSource<MotorPolicyDto>("MotorPolicyDs", policy));

            return localReport;            
        }                                
    }
}
